$('#logout').on('click',function() {
    var isconfirm = confirm('是否真的要退出');
    if(isconfirm){
      $.ajax({
        type:'post',
        url:'/logout',
        success:function(){
            location.href = 'login.html';
        },
        error:function(){
          alert('用户退出失败')
        }
      })
    }
  })